function h = uipreview_GenerateFcn
%UIPREVIEW_CREATEFCN Summary of this function goes here
%   Detailed explanation goes here

ui.Panel.Style={'units', 'pixel', 'BorderType', 'beveledin'};
ui.ToggleButton.Style= {'style', 'togglebutton'};
ui.ButtonGroup.Style={'units', 'normalized'};

h= uipanel(ui.Panel.Style{:}, 'title', 'Preview');
  
bgPreviewControls=uibuttongroup(ui.ButtonGroup.Style{:}, 'parent', h, 'BorderType', 'none', 'position', [0 0 1 1], 'SelectionChangeFcn', @bgPreviewControls_SelectionChangeFcn);
     
uicontrol(ui.ToggleButton.Style{:}, 'parent', bgPreviewControls, 'string', 'Start', 'units', 'normalized', 'Position', [[.05 .5 0.9 .45]], 'tag', 'pbStart', 'value', 1);
pbStop= uicontrol(ui.ToggleButton.Style{:}, 'parent', bgPreviewControls, 'string', 'Stop', 'units', 'normalized', 'Position', [.05 .05 0.9 .45], 'tag', 'pbStop', 'value', 0);

e.NewValue= pbStop;
set(bgPreviewControls, 'SelectedObject', pbStop);
bgPreviewControls_SelectionChangeFcn(bgPreviewControls, e)

end


